home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15369 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1009 b 

  1. Path: news.eecs.umich.edu!usenet
  2. From: niranjan@eecs.umich.edu (Niranjan Ramakrishnan)
  3. Newsgroups: comp.lang.c
  4. Subject: simulating fscanf for strings?
  5. Date: 18 Apr 1996 14:38:35 -0400
  6. Organization: Department of EECS, University of Michigan, Ann Arbor
  7. Sender: niranjan@wits-end.eecs.umich.edu
  8. Message-ID: <ief20llwf6c.fsf@wits-end.eecs.umich.edu>
  9. NNTP-Posting-Host: wits-end.eecs.umich.edu
  10. X-Newsreader: Gnus v5.1
  11.  
  12. Hi,
  13.  
  14. Does anyone know of a method to simulate what fscanf does (in the case of
  15. a file pointer) in a character pointer? The only closest thing available is
  16. sscanf but it doesn't automatically advance the pointer past the number of
  17. bytes read. Also it doesn't return the number of bytes read either so I'm
  18. unable to advance the pointer using a simple +=sscanf() call. What I want,
  19. basically, is a function that does exactly what fscanf does except that it
  20. takes a char * arg instead of a FILE *. Is this possible at all?
  21.  
  22. Any advice will be deeply appreciated.
  23.  
  24. Thanx,
  25.  
  26. Niranjan
  27.  
  28. -- 
  29. - Niranjan
  30.  
  31.